<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
<title>百度在线编辑器</title>
<link id="favicon" rel="shortcut icon" href="${ctx}/static/imgs/favicon.ico" />
<script src="${ctx}/static/assets/jquery/jquery-1.11.3.min.js" type="text/javascript"></script>

<script src="${ctx}/static/assets/ueditor1_4_3_1-jsp/ueditor.config.js"></script>
<script src="${ctx}/static/assets/ueditor1_4_3_1-jsp/ueditor.all.min.js"></script>

<script type="text/javascript">
$(function(){
	var ue = new UE.ui.Editor({ /*toolbars : $.webapp.ue_simple()*/ });
	ue.render('container');
	ue.addListener('ready', function(e) {
		ue.setContent("Hello") ;
	});
	$("#bto").on("click", function(){
		$.post("${ctx}/other/ueditor_add", {"content": ue.getContent()}, function(result){
			$("#content").html(result);
		});
	});
});
</script>

<body>

	<div style="width:900px;height: 600px;margin:0 auto;border:1px solid red;display: table;">
		<!-- 加载编辑器的容器 -->
	    <script id="container" name="content" type="text/plain" style="height:300px;"></script>
	    <button id="bto">提交到后台</button>
	    
	    <div id="content" style="background: #eee;"></div>
	</div>
    
</body>
</html>